<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>DWR3.0学习-接收推送</title>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/interface/messagePush.js"></script>
</head>
<body>
	dwr接收
	<br />
	<div id="content"
		style="width: 200px; height: 30px; border: 1px solid; text-align: center; padding: 5px;">
	</div>
	<script type="text/javascript">
		//这个方法用来启动该页面的ReverseAjax功能  
		dwr.engine.setActiveReverseAjax(true);
		//设置在页面关闭时，通知服务端销毁会话  
		dwr.engine.setNotifyServerOnPageUnload(true);
		messagePush.getTag(function(tag){
			console.log('tag---'+tag);
			messagePush.onPageLoad(tag);
		});
		
		//这个函数是提供给后台推送的时候 调用的  
		function show(content) {
			$("#content").text(content);
		}
	</script>
</body>
</html>